<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script setup>
import { useDeviceStore } from '@/stores/device'

const deviceStore = useDeviceStore()

// 初始化设备检测
deviceStore.checkDevice()

// 监听窗口大小变化
window.addEventListener('resize', () => {
  deviceStore.checkDevice()
})
</script>

<style lang="scss">
#app {
  width: 100%;
  height: 100vh;
  background-color: #f7f8fa;
}
</style>